<?php
/**
 * Created by PhpStorm.
 * User: wolf
 * Date: 2018/7/5
 * Time: 9:43
 */

namespace App\Http\Controllers\Web;


use App\Http\Controllers\Controller;
use App\Models\Shop;
use App\Repositories\PrinterRepository;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;

class PrinterController extends Controller
{
    protected $printerRepository;

    public function __construct(PrinterRepository $printerRepository)
    {
//        $this->middleware('auth');
        $this->printerRepository=$printerRepository;
    }

    //  获取所有打印机设备
    public function getAllPrinter(Request $request){

        return $this->printerRepository->getAllPrinters($request);
    }

    // 编辑打印机设备
    public function editPrinter(Request $request){
        return $this->printerRepository->editPrinter($request);
    }

    // 添加打印机设备
    public function addPrinter(Request $request){
        return $this->printerRepository->addPrinter($request);
    }

    // 展示某一个打印机设备
    public function showOnePrinter(Request $request){
        return $this->printerRepository->showOnePrinter($request);
    }

    // 删除打印机
    public function deleteOnePrinter(Request $request){
        return $this->printerRepository->deletePrinter($request);
    }
}